package com.wtx.chapter02;

/**
 * @description: 学生类
 * @author: wtx
 * @createDate: 2020/5/14
 */
public class Student {

    private String name;
    private int score;

    public Student(String name, int score) {
        this.name = name;
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", score=" + score +
                '}';
    }


    public static void main(String[] args) {
        Array<Student> array = new Array<>(1);
        array.addFirst(new Student("Tom",100));
        System.out.println(array.toString());

        //扩容
        array.addLast(new Student("John",99));
        System.out.println(array.toString());
    }
}
